/*
 * @Description: 邀请ui
 * @Author: iamsmiling
 * @Date: 2021-05-27 21:05:05
 * @LastEditTime: 2021-06-13 08:33:16
 */
import 'package:credit_business_circle/R/R.dart';
import 'package:credit_business_circle/pages/mine/children/invitate/invite_controller.dart';
import 'package:credit_business_circle/pages/mine/children/invitate/section/invitation_appbar.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';

import 'section/invitation_action_card.dart';
import 'section/invitation_header.dart';
import 'section/invitation_record_card.dart';
import 'section/invitation_rule_card.dart';
import 'section/invitation_step_card.dart';

class InvitePage extends GetView<InviteController> {
  const InvitePage({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Container(
        width: R.dimen.width,
        height: double.maxFinite,
        decoration: BoxDecoration(
            gradient: LinearGradient(
                begin: Alignment.topCenter,
                end: Alignment.bottomCenter,
                colors: [R.color.ff2eab86, R.color.ffaceda8])),
        child: SingleChildScrollView(
          child: Column(
            crossAxisAlignment: CrossAxisAlignment.start,
            children: [
              InvitationAppBar(),
              InvitationHeader(),
              InvitationStepCard(),
              InvitationActionCard(),
              InvitationRecordCard(
                records: controller.records,
              ),
              InvitationRuleCard()
            ],
          ),
        ),
      ),
    );
    // return Material(
    //   child: Container(
    //     width: R.dimen.width,
    //     height: double.maxFinite,
    //     decoration: BoxDecoration(
    //         gradient: LinearGradient(
    //             begin: Alignment.topCenter,
    //             end: Alignment.bottomCenter,
    //             colors: [R.color.ff2eab86, R.color.ffaceda8])),
    //     child: Stack(
    //       children: [
    //         Positioned(
    //           left: -R.dimen.dp24,
    //           top: Get.mediaQuery.padding.top + R.dimen.dp8,
    //           child: Container(
    //             alignment: Alignment.center,
    //             child: Stack(
    //               alignment: AlignmentDirectional.center,
    //               children: [
    //                 Image.asset(
    //                   R.image.inviteCommission,
    //                   width: R.dimen.width + R.dimen.dp16 * 2,
    //                   fit: BoxFit.fitWidth,
    //                 ),
    //                 Positioned(
    //                   top: R.dimen.dp187,
    //                   child: Text(
    //                     "5",
    //                     style: TextStyle(
    //                         fontSize: R.dimen.sp90,
    //                         color: R.color.ffff444b,
    //                         fontWeight: FontWeight.w600),
    //                   ),
    //                 ),
    //                 Positioned(
    //                     left: R.dimen.width / 2 + R.dimen.dp32,
    //                     top: R.dimen.dp187 + R.dimen.dp60,
    //                     child: Container(
    //                         alignment: Alignment.center,
    //                         width: R.dimen.dp28,
    //                         height: R.dimen.dp28,
    //                         decoration: BoxDecoration(
    //                             gradient: LinearGradient(colors: [
    //                               R.color.fffe500e,
    //                               R.color.fffb0c02
    //                             ]),
    //                             border: Border.all(
    //                                 width: 1.5, color: R.color.ffffd358),
    //                             borderRadius:
    //                                 BorderRadius.circular(R.dimen.dp28 / 2)),
    //                         child: Text(
    //                           "元",
    //                           style: TextStyle(
    //                               fontSize: R.dimen.sp14,
    //                               color: R.color.ffffe5c6),
    //                         )))
    //               ],
    //             ),
    //           ),
    //         ),
    //         Column(
    //           children: [
    //             Container(
    //               margin: EdgeInsets.only(top: Get.mediaQuery.padding.top),
    //               child: Column(
    //                 children: [
    //                   Row(
    //                     children: [
    //                       BackButton(
    //                         color: R.color.ffffffff,
    //                         onPressed: Get.back,
    //                       ),
    //                       GestureDetector(
    //                         onTap: () => Get.toNamed(
    //                             Get.currentRoute + AppRoutes.poster),
    //                         child: Container(
    //                             margin: EdgeInsets.only(left: R.dimen.dp130),
    //                             child: Text(
    //                               "邀请好友",
    //                               style: TextStyle(
    //                                   fontSize: R.dimen.sp16,
    //                                   color: R.color.ffffffff,
    //                                   fontWeight: FontWeight.w600),
    //                             )),
    //                       )
    //                     ],
    //                   ),
    //                   Container(
    //                     margin: EdgeInsets.only(
    //                         left: R.dimen.dp20,
    //                         right: R.dimen.dp24,
    //                         top: R.dimen.dp24),
    //                     child: Image.asset(
    //                       R.image.freeVip,
    //                       width: R.dimen.width,
    //                       fit: BoxFit.fitWidth,
    //                     ),
    //                   ),
    //                 ],
    //               ),
    //             ),
    //           ],
    //         ),
    //       ],
    //     ),
    //   ),
    // );
  }
}
